'use strict';
app.service('modulesShopsService',['$q','utilService',function($q,utilService){
    var _this_=this;
    //添加模块商品
    _this_.addModulesShop= function ($scope) {
        var deferred = $q.defer();
        utilService.api({
            url:$scope.app.domain + 'modules/shops',
            data:$scope.modulesShopsVO,
            method:'POST'
        }).then(function(result){
            deferred.resolve(result);
        });
        return deferred.promise;
    }
    //移除模块店铺
    _this_.delModulesShop= function ($scope) {
        var deferred = $q.defer();
        utilService.api({
            url:$scope.app.domain + 'modules/shops',
            data:$scope.modulesShopsVO,
            method:'DELETE'
        }).then(function(result){
            deferred.resolve(result);
        });
        return deferred.promise;
    }
}]);